object Demo13Tuple {
  def main(args: Array[String]): Unit = {
    /**
     * 元组：不可变、有序的、最大长度为22、元素可以重复
     * 常见的操作基本没有，只有通过"下标"(下划线标号)去获取元素
     */
    // 构建1元组
    val t1: Tuple1[Int] = Tuple1(1)
    // 构建2元组
    val t2: (Int, Int) = Tuple2(1, 2)

    // 构建3元组
    val t3: (Int, Int, Int) = Tuple3(1, 2, 3)

    // 构建8元组
    val t8: (Int, Int, Int, Int, Int, Int, Int, Int) = Tuple8(1, 2, 3, 4, 5, 5, 5, 6)

    // 构建5元组
    val t5: (Int, Int, Int, Int, Int) = (1, 2, 3, 4, 5)
    println(t5._5)
  }

}
